package com.example.spring_config.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class CommonController {

    @RequestMapping("/popupPage/{modelName}/{pageName}/{id}")
    public String popupPage(@PathVariable String modelName,
                          @PathVariable String pageName,
                          @PathVariable String id,
                          Model model){
        model.addAttribute("id",id);
        return modelName+"/"+pageName;
    }

}
